Skip to content

[dynamic control] Add delegating sampler implementation#2607

Merged
jaydeluca merged 12 commits intoopen-telemetry:mainfrom
jackshirazi:policy3
Feb 12, 2026
Merged

[dynamic control] Add delegating sampler implementation#2607
jaydeluca merged 12 commits intoopen-telemetry:mainfrom
jackshirazi:policy3

Conversation

@jackshirazi
Copy link
Copy Markdown
Contributor

Per #2546

The delegating sampler makes support for any sampler fully dynamic, allowing it to be reconfigured or even fully replaced at runtime

A full working implementation of the open-telemetry/opentelemetry-specification#4738 is here in this branch

@jackshirazi jackshirazi requested a review from a team as a code owner February 5, 2026 13:46
Copilot AI review requested due to automatic review settings February 5, 2026 13:46
@github-actions github-actions bot requested a review from LikeTheSalad February 5, 2026 13:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a DelegatingSampler implementation that enables dynamic configuration of sampling behavior at runtime. The delegating sampler wraps any OpenTelemetry sampler and allows it to be replaced during application execution without requiring a restart.

Changes:

  • Adds a new DelegatingSampler class that implements the Sampler interface
  • Uses AtomicReference to safely manage the delegate sampler in concurrent environments
  • Provides methods to update the delegate sampler at runtime

@jackshirazi jackshirazi requested a review from Copilot February 6, 2026 09:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.

jackshirazi and others added 5 commits February 10, 2026 13:00
…/sampler/DelegatingSampler.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…/sampler/DelegatingSampler.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…/sampler/DelegatingSampler.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jackshirazi jackshirazi requested a review from Copilot February 10, 2026 13:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

@jackshirazi jackshirazi requested a review from Copilot February 10, 2026 14:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

…/sampler/DelegatingSampler.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jaydeluca jaydeluca added this pull request to the merge queue Feb 12, 2026
Merged via the queue into open-telemetry:main with commit 5aae224 Feb 12, 2026
21 checks passed
@jackshirazi jackshirazi deleted the policy3 branch April 1, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants